home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
CYBERVILLAGE
/
ANT
/
ANTUTILS.ZIP
/
!GetmyMail
/
RunCheck
(
.txt
)
< prev
Wrap
RISC OS BBC BASIC V Source
|
1998-08-09
|
4KB
|
143 lines
(V1.71) Runcheck
Quantum Software 1997
FREEWARE
This program checks to see if the application is loaded
and if NOT then it runs the application from the full file path supplied.
use: *Runcheck <full file path>
See the DATA statements below, if it appears not to work...
BTW, The best place to put this program is in !Boot.library
ver$="V1.71"
app$="Runcheck"
buffer% 256,q% 1000
"OS_GetEnv"
command%
!command$=
getstring(command%)
"OS_GSTrans","<Wimp$State>",buffer%,256
state$=
getstring(buffer%)
state$="commands"
desktop%=
desktop%=
4param$=
command$,
(command$)-
command$,""" ")-1)
"OS_GSTrans",param$,buffer%,256
param$=
getstring(buffer%)
app$=
getleaf(param$,"")
app$,1)="!"
app$=
app$,2)
app$=
makelowercase(app$)
param$=""
desktop%=
errorbox(0,"Syntax: '"+app$+" <filepath>. If the application is not loaded it will be run.",2):
param$=""
desktop%=
app$+" "+ver$+
&0A+"Syntax: Runcheck <full filepath>. If the application is not loaded it will be run.":
initwimp(app$)
param$," ") >0
spaces%=
app$=
app$,
app$," ")-1)
spaces%=
PRINT ">>";app$;"<<->>";param$;"<<"
A%=GET
task%=0
loaded%=
"TaskManager_EnumerateTasks",task%,buffer%,16
task%
50 task$=
makelowercase(
getstring(buffer%!4))
specialcases(app$) =task$
buffer%!12 = 0
loaded%=
task%=-1
loaded%=
spaces%=
"Wimp_StartTask","Filer_Run "+param$
loaded%=
spaces%=
"Wimp_StartTask","WIMPTASK "+param$
loaded%=
("Set apploaded 1")
("Set apploaded 0")
"Wimp_CloseDown"
getleaf(f$,g$)
g$=""
g$="."
f$,g$)
f$=
f$,g$)+1)
makelowercase(string$)
H p$=""
X%=1
string$
string$,X%,1))
C% <=90
C%>=65
C%+=32
p$+=
getstring(ptr%)
Q p$=""
(?ptr%>31
?ptr%<256)
(p$)<255
c%=?ptr%
p$+=
ptr%+=1
specialcases(application$)
filername$,taskname$
application$=filername$
filername$="end":application$=taskname$
filername$="end"
=application$
initwimp(taskname$)
"Wimp_Initialise",200,&4B534154,taskname$
finished%=
errorbox(error%,error$,flags%)
g( !buffer%=error%:$(buffer%+4)=error$
"Wimp_ReportError",buffer%,flags%,app$
,result%
result%=2
"Wimp_CloseDown":
"OS_Exit"
Runcheck relies on the fact that most names in the Task window
are the same as the Filer name you provided minus the '!'.
ie ADFS::4.$.!Paint
But sometimes an application uses a different name in the Task
window than the limited 10 letter name in the Filer.
In these cases enter the Filer name followed by the exact name as
it appears in the task window (please ensure that all letters are
entered in lowercase.
email me if you've had to add any.
stuart@quantumsoft.co.uk
"fresco" , "ant fresco"
"tempdir" , "tempdirectory"
"style" , "impression style"
"publisher", "impression publisher"
"publish+" , "publisher plus"
"pc" , "pc card software"
"audiowrks", "audioworks"
"imagefs" , "imagefs
control"
"appdock2" , "application dock"
"screensav", "screen saver"
"quickdir" , "quick directories"
"omni" , "omniclient"
"coolswtch", "coolswitch"
"trash" , "trash can"
"ovnpro" , "ovationpro"
"fontdir" , "font directory"
"TrceRoute", "traceroute"
"monty" , "monty (1.20)"
leave this line alone and at the end of this file
"end","end"